package com.chixing.controller;

import com.chixing.service.BrandStepService;
import com.chixing.service.StoreService;
import com.chixing.util.ServerResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.persistence.criteria.CriteriaBuilder;

@Controller
public class BrandStepController {
    @Autowired
    private BrandStepService brandStepService;

//    @GetMapping("car/car1/{carId}")
//    @ResponseBody
//    public ServerResponse car(@PathVariable("carId") Integer carId){
//        ServerResponse serverResponse = brandStepService.getByCarId(carId);
//        return serverResponse;
//    }

    @GetMapping("car/brandstep")
    @ResponseBody
    public ServerResponse getByCity (Integer storeId){
        return brandStepService.getByStoreId(storeId);
    }

}
